package photo.navi;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.media.ThumbnailUtils;

public class PhotoLocation {
	//private variables
    int _id;
    String _gps_location;
    String _photo_path;
    String _description;
    private final static int THUMBNAIL_SIZE=80;
    // Empty constructor
    public PhotoLocation(){
 
    }
    
    // constructor
    public PhotoLocation(int id, String gps_location, String photo_path, String description){
        this._id = id;
        this._gps_location = gps_location;
        this._photo_path = photo_path;
        this._description = description;
    }
 
    // constructor
    public PhotoLocation(String gps_location, String photo_path, String description){
        this._gps_location = gps_location;
        this._photo_path = photo_path;
        this._description = description;
    }
    
    // getting ID
    public int getID(){
        return this._id;
    }
 
    // setting id
    public void setID(int id){
        this._id = id;
    }

	public String getGpsLocation() {
		return _gps_location;
	}

	public void setGpsLocation(String gps_location) {
		this._gps_location = gps_location;
	}

	public String getPhotoPath() {
		return _photo_path;
	}

	public void setPhotoPath(String photo_path) {
		this._photo_path = photo_path;
	}

	public String getDescription() {
		return _description;
	}

	public void setDescription(String description) {
		this._description = description;
	}
	
	public Bitmap picture() {
        return ThumbnailUtils.extractThumbnail(BitmapFactory.decodeFile(getPhotoPath()), THUMBNAIL_SIZE, THUMBNAIL_SIZE);
	}

}
